# 记录南京1000个富婆的手机号怎么操作？

# 列表 -> 其它语言叫数组

dont_want_to_fight = ['15895805051', '15895805052', '15895805053', '15895805054']

# 1. 通过索引获取指定位置的数据
print(dont_want_to_fight[0])
print(dont_want_to_fight[1])
print(dont_want_to_fight[-1])

# 2. 修改列表指定位置的值
dont_want_to_fight[1] = '15895805062'

# 3. 列表追加数据
# 尾部添加
dont_want_to_fight.append('15895805055')
# 指定位置添加
dont_want_to_fight.insert(0, '15895805045')

print(dont_want_to_fight)
# 4. 删除一个富婆的电话号码
# 删除尾部的号码
dont_want_to_fight.pop()
print(dont_want_to_fight)
# 删除指定下标的数据
dont_want_to_fight.pop(0)
print(dont_want_to_fight)

# 根据值进行删除
dont_want_to_fight.remove('15895805062')
print(dont_want_to_fight)
